package com.tjy.farmer.service.impl;

import java.util.List;
import com.tjy.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.tjy.farmer.mapper.BeeAreaInfoMapper;
import com.tjy.farmer.domain.BeeAreaInfo;
import com.tjy.farmer.service.IBeeAreaInfoService;

/**
 * 蜂区管理Service业务层处理
 * 
 * @author tjy
 * @date 2025-09-08
 */
@Service
public class BeeAreaInfoServiceImpl implements IBeeAreaInfoService 
{
    @Autowired
    private BeeAreaInfoMapper beeAreaInfoMapper;

    /**
     * 查询蜂区管理
     * 
     * @param id 蜂区管理主键
     * @return 蜂区管理
     */
    @Override
    public BeeAreaInfo selectBeeAreaInfoById(Long id)
    {
        return beeAreaInfoMapper.selectBeeAreaInfoById(id);
    }

    /**
     * 查询蜂区管理列表
     * 
     * @param beeAreaInfo 蜂区管理
     * @return 蜂区管理
     */
    @Override
    public List<BeeAreaInfo> selectBeeAreaInfoList(BeeAreaInfo beeAreaInfo)
    {
        return beeAreaInfoMapper.selectBeeAreaInfoList(beeAreaInfo);
    }

    /**
     * 新增蜂区管理
     * 
     * @param beeAreaInfo 蜂区管理
     * @return 结果
     */
    @Override
    public int insertBeeAreaInfo(BeeAreaInfo beeAreaInfo)
    {
        beeAreaInfo.setCreateTime(DateUtils.getNowDate());
        return beeAreaInfoMapper.insertBeeAreaInfo(beeAreaInfo);
    }

    /**
     * 修改蜂区管理
     * 
     * @param beeAreaInfo 蜂区管理
     * @return 结果
     */
    @Override
    public int updateBeeAreaInfo(BeeAreaInfo beeAreaInfo)
    {
        beeAreaInfo.setUpdateTime(DateUtils.getNowDate());
        return beeAreaInfoMapper.updateBeeAreaInfo(beeAreaInfo);
    }

    /**
     * 批量删除蜂区管理
     * 
     * @param ids 需要删除的蜂区管理主键
     * @return 结果
     */
    @Override
    public int deleteBeeAreaInfoByIds(Long[] ids)
    {
        return beeAreaInfoMapper.deleteBeeAreaInfoByIds(ids);
    }

    /**
     * 删除蜂区管理信息
     * 
     * @param id 蜂区管理主键
     * @return 结果
     */
    @Override
    public int deleteBeeAreaInfoById(Long id)
    {
        return beeAreaInfoMapper.deleteBeeAreaInfoById(id);
    }
}
